package com.cuixichang.minimalism.service;

import com.cuixichang.minimalism.transfer.dto.IFormValueDTO;
import com.cuixichang.minimalism.transfer.po.IFormValue;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
import java.util.function.BiConsumer;
import java.util.function.Function;
/**
 * 服务接口
 *
 * @author cuixichang
 * @date 2024-12-20
 */
public interface IFormValueService{

    IFormValueDTO selectById(Long id);

    IFormValueDTO selectOne(IFormValueDTO iFormValueDTO);

    List<IFormValueDTO> selectByIds(List<Long> ids);

    List<IFormValueDTO> selectList(IFormValueDTO iFormValueDTO);

    List<IFormValueDTO> selectList(IFormValueDTO iFormValueDTO, BiConsumer<IFormValue, QueryWrapper<IFormValue>> consumer);

    Page<IFormValueDTO> selectPage(IFormValueDTO iFormValueDTO, long pageSize, long pageNo);

    Page<IFormValueDTO> selectPage(IFormValueDTO iFormValueDTO, long pageSize, long pageNo, BiConsumer<IFormValue, QueryWrapper<IFormValue>> consumer);

    int deleteById(Long id);

    int deleteByIds(List<Long> ids);

    int deleteByCondition(IFormValueDTO iFormValueDTO);

    int deleteByCondition(IFormValueDTO iFormValueDTO, BiConsumer<IFormValue, QueryWrapper<IFormValue>> consumer);

    IFormValueDTO insert(IFormValueDTO iFormValueDTO);

    IFormValueDTO insertHasOption(IFormValueDTO iFormValueDTO, Function<IFormValueDTO,IFormValueDTO> preOption);

    int updateById(IFormValueDTO iFormValueDTO);

    int updateById(IFormValueDTO iFormValueDTO, BiConsumer<IFormValue, UpdateWrapper<IFormValue>> consumer);
}